import request from "@/common/untils/request.js"


// 获取本地库对应数据
export const getPersonList = (query) => {
  return request({
    url: "/data/api-v/dbperson/queryDbPersonsByTbId",
    method: "post",
    data: query
  });
};

// 底库列表
export const getTagList = (query) => {
  return request({
    url: "/data/api-v/es/tagList",
    method: "post",
    data: query
  });
};

// 本地库列表
export const queryDbTables = (query) => {
  return request({
    url: "/data/api-v/dbtable/queryDbTables",
    method: "post",
    data: query
  });
};

// 添加本地库
export const addBase = (query) => {
  return request({
    url: "/data/api-v/dbtable/addDbTableInfo",
    method: "post",
    data: query
  })
}

// 删除底库
export function deleteDBtablesById(data) {
  return request({
    url: `/data/api-v/dbtable/deleteDBtablesById?id=${data}`,
    method: "post",
    data
  })
}

// 编辑底库
export function updateBase(data){
  return request({
    url: "/data/api-v/dbtable/updateDbTables",
    method: "post",
    data
  })
}

// 修改人员信息
export function updateBaseCar(data){
  return request({
    url: "/data/api-v/dbperson/updateDbPerson",
    method: "post",
    data
  })
}

// 上传图片到底库
export function moreFileUpload(data){
  return request({
    url: "/data/api-v/dbperson/moreFileUpload",
    method: "post",
    data
  })
}

// 批量删除人员
export function deleteMoreDbPerson(data){
  return request({
    url: "/data/api-v/dbperson/deleteMoreDbPerson",
    method: "post",
    data
  })
}

// 删除单个人员
export function deleteDbPersonById(data) {
  return request({
    url: `/data/api-v/dbperson/deleteDbPersonById?id=${data}`,
    method: "post",
    data
  })
}

// 移动人员
export function moveLibraryUser(data){
  return request({
    url: "/data/api-v/dbperson/move",
    method: "post",
    data
  })
}

// 复制人员
export function copyLibraryUser(data){
  return request({
    url: "/data/api-v/dbperson/copy",
    method: "post",
    data
  })
}

// 地库状态更改
export function updateDbTableStatus(data){
  return request({
    url: "/data/api-v/dbtable/updateDbTableStatus",
    method: "post",
    data
  })
}

// 新增车辆信息
export function addDbPerson(data){
  return request({
    url: "/data/api-v/dbperson/addDbPerson",
    method: "post",
    data
  })
}

// 车辆字典信息
// export function dicByType(data){
//   return request({
//     url: "/data/api-v/dbperson/dicByType",
//     method: "get",
//     data
//   })
// }

// 批量上传车牌
export function multiUploadCarNo(data){
  return request({
    url: "/data/api-v/dbperson/multiUploadCarNo",
    method: "post",
    data
  })
}